import React, { Component } from 'react';
import {store} from '../../store/index';
class Mine extends Component {
    state={
        userinfo:JSON.parse(localStorage.getItem('userinfo')),
    }
    render() {
        return (
            <div className='mine'>
                <div className="mine-hea">
                    <div className="touxiang">
                        <img src={this.state.userinfo.avatarUrl} alt="头像" />
                        <span>{this.state.userinfo.phone}</span>
                    </div>
                </div>
                <div className='mine-shou'>
                    <div className='shou-child' onClick={()=>{ this.props.history.push('/collect')}}>
                        <span>{store.getState().collectlist.length}</span>
                        <span>收藏</span>
                    </div>
                    <div className='shou-child'>
                        <span>0</span>
                        <span>积分</span>
                    </div>
                    <div className='shou-child'>
                        <span>0</span>
                        <span>优惠券</span>
                    </div>
                </div>
                <div className="mine-ord">
                    <div className="ord-hea">
                        <span className='ord'>我的订单</span>
                        <span className='find'>查看全部订单<span className='iconfont icon-changyongicon-'></span></span>
                    </div>
                    <div className="ord-fu">
                        <div className="fu">
                            <span className='iconfont icon-daifukuan'></span>
                            <span className='dai'>待付款</span>
                        </div>
                        <div className="fu">
                            <span className='iconfont icon-daifahuo'></span>
                            <span className='dai'>待发货</span>
                        </div>
                        <div className="fu">
                            <span className='iconfont icon-yifahuo'></span>
                            <span className='dai'>已发货</span>
                        </div>
                        <div className="fu">
                            <span className='iconfont icon-daipingjia01'></span>
                            <span className='dai'>待评价</span>
                        </div>
                    </div>
                </div>
                <div className='mine-hui'>
                    <span className='hui'>会员中心</span>
                    <span className='iconfont icon-changyongicon-'></span>
                </div>
                <div className="mine-quan">
                    <div className='quan'>
                        <span className='hui'>领券中心</span>
                        <span className='iconfont icon-changyongicon-'></span>
                    </div>
                    <div className='quan'>
                        <span className='hui'>我的评价</span>
                        <span className='iconfont icon-changyongicon-'></span>
                    </div>
                    <div className='quan'>
                        <span className='hui'>收货地址</span>
                        <span className='iconfont icon-changyongicon-'></span>
                    </div>
                    <div className='quan'>
                        <span className='hui'>我的客服</span>
                        <span className='iconfont icon-changyongicon-'></span>
                    </div>
                </div>
            </div>
        );
    }
}

export default Mine;